<template>
  <view>
    <slot :text="text"></slot>
    <view class="click-test" @click="onClick">{{text}}</view>
  </view>
</template>

<script>
export default {
  props: ['text'],
  data () {
    return {
      index: 0
    }
  },
  methods: {
    onClick (event) {
      console.log('onClick:', event)
      this.index++
      return event
    }
  }
}
</script>

<style>
</style>